package com.supor.aiot.home.ui.device.config.hw;

import android.os.Bundle;

import com.supor.aiot.common.base.BaseMVVMFragment;
import com.supor.aiot.home.R;

import androidx.annotation.Nullable;


public class HwConfigStateFragment extends BaseMVVMFragment {

    private static final String PAGE = "page";
    int page;

    /**
     * @param page page
     * @return
     */
    public static HwConfigStateFragment newInstance(int page) {
        HwConfigStateFragment fragment = new HwConfigStateFragment();
        Bundle args = new Bundle();
        args.putInt(PAGE, page);
        fragment.setArguments(args);
        return fragment;
    }

    @Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (null != getArguments()) {
            page = getArguments().getInt(PAGE);
        }
    }

    @Override
    public int setContent() {
        if (page == 1) {
            return R.layout.fragment_hw_config_state;
        } else {
            return R.layout.fragment_chef_machine_config_state;
        }
    }
}